<template>
  <div class="recom-container">
      <h3>{{recommend.title}}</h3>
      <hr/>
      <div v-html="recommend.content"></div>
  </div>
</template>

<script>
export default {
    data(){
        return{
            id:this.$route.params.id,
            recommend:[]//存放图文数据
        }
    },
    mounted(){
        this.getrecom();
    },
    methods:{
        // 获取图文介绍
        getrecom(){
            this.$http.get('api/goods/getdesc/'+this.id).then(result=>{
                let data=result.body;
                if(data.status===0){
                    this.recommend=data.message[0];
                }
            })
        }
    }
}
</script>

<style lang="scss">
.recom-container{
    margin-bottom: 1rem;
    padding: .1rem;
    h3{
        font-size: .32rem;
        text-align: center;
        color: #007aff;
        margin: .30rem 0;
    }
    img.gomeImgLoad{
        width: 100%;
        height: auto;
    }
}
</style>